window.scrollBy only works in Firefox !? [closed]
Posted
by
Patrick
on Pro Webmasters
See other posts from Pro Webmasters
or by Patrick
Published on 2011-02-06T20:52:51Z
Indexed on
2011/02/06
23:35 UTC
Read the original article
Hit count: 237
JavaScript
In my website I have this javascript code, adding a vertical offset when in the url a specific section of the page is specified (#):
if (!!window.location.hash) window.scrollBy(0,-60);
However this only works in Firefox... I'm pretty sure window.location.hash works in all browsers, that is, the symbol "sharp" is correctly detected in the url.
However, the -60 offset only works in Firefox... this is the url, could you give me some insight ?
http://patrickdiviacco.co.cc/#432
thanks
© Pro Webmasters or respective owner